home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
os2
/
tmidi_17.zip
/
tmidi.doc
< prev
next >
Wrap
Text File
|
1997-03-30
|
10KB
|
252 lines
tmidi.doc Copyright (C)1997 Cornel Huth
Release 1.7 30-Mar-1997
tmidi is a real-time, VIO-based standard MIDI file player. Files
included are:
1. paradise.sys
2. tmidi.exe
3. several SMFs, documentation
Optionally, if you are running Warp 3 or earlier:
4. clock01.sys (clock02.sys available by request, for MCA)
No other drivers are needed. MMPM/2 is not required (but is okay), nor
are any soundcard drivers. This package includes everything you need for
perfect MIDI playback, even under heavy multitasking. tmidi transmits
all MIDI data to the device, including sysex messages. You can now
specify the playback mode (GM, GS, or XG) if not already in the SMF.
============
NEW in 1.5 Sound Blaster Driver Fixed
============
Version 1.5 introduces fixes that allow it to work in spite of the
(an unnamed) driver that resets the MPU interface every chance it gets,
such as when you start/end a wave play and do not already have MIDI going.
Oh, by the way, this fix in tmidi only relates to those of you using
cards that use SB16D2.SYS (and perhaps the AWE version). In the end,
tmidi plays on, albeit with a burp or two when you play a wave. I was
made aware of this only today. I think their driver does this in an
attempt to deal with "hanging notes" that SBs are said to cause. I've
never had a problem with hanging notes, so I consider this tactic of
doing an MPU reset at -WAVE- play start/end tantamount to shooting one's
foot.
Also recently available is tmixer 1.3, in a separate package called
tmixer*.zip. VIO, works in 2.1, Warp 3 and 4.
Also recently available is aMixer 1.3, in a separate package called
amixer*.zip (includes SyncLock). PM, works in Warp 3 and Warp 4.
Installation
------------
Install the (two) SYS driver(s) in your boot drive's root directory and
include a reference for the paradise driver in your config.sys:
DEVICE=G:\PARADISE.SYS (optional -q for quiet install)
Pardise driver 1.52 or later is required.
CLOCK01.SYS, installed automatically by the boot process and so has no
reference in the config.sys file, is based on the Warp 4.0 driver. It
can be used in previous OS/2 versions, too. If you are using Warp 4.0,
your CLOCK driver already has the IDC hook, so you can use the one you
already have. The included CLOCK01.SYS driver is only for those running
Warp 3 or earlier.
If you have the old clock driver installed, paradise.sys will gracefully
tell you so, and not install itself. If you get this message at boot, use
the included clock01.sys.
Note: Due to a long-standing bug in OS/2, detection of obsolete clock
drivers is not as straight-forward as it should be. However, if the
obsolete clock is not found during boot, it likely will be found by tmidi.
If it still gets by you will likely crash your machine. Keep a boot floppy
available and simply replace your obsolete clock01.sys driver with the
one included in this package.
The clock01.sys driver in Warp 3's fixpack #26 is -not- an up-to-date
driver. If the clock01.sys driver is substantially less than 4000 bytes
(e.g., 3520 bytes, like the fp26 one (date 10-10-96)) you need to install
the clock01.sys driver included in this package.
Once you have the driver(s) installed, reboot.
Using tmidi
-----------
[G:\]tmidi [-p1:330] file.mid [<-gm,-gs-xg>] [-w1:n] [-t:x]
For example:
[G:\]tmidi -p1:330 cometomy.mid
The default MPU port is 330h, and if there, does not need to be specified.
The Paradise driver handles up to 126 ports, but tmidi, being what it is,
directs everything out port 1 (where a port here is a particular device).
So, just:
[G:\]tmidi alliwann.mid
Once you hit enter, the SMF is loaded and play starts. Any key press (just
about) exits tmidi and stops all sounds. In case of emergency, an exit list
handler is installed to ensure everything gets shut down.
[I:\tmidi\mids]tmidi reaperxg.mid -xg
mpu: 330, type: 1, tracks: 20, div: 120, mode: XG
-008222116
The above is an example of an SMF without an embedded mode, so -xg is needed
to make it sound its best. Not all MPU devices have XG mode, or GS, but
most are GM-capable.
If an error in the SMF is detected, the track and tick count where the
problem occured is shown.
Specifying Mode
---------------
An optional switch is the MIDI playback mode: GM, GS, or XG. If the
SMF contains embedded mode, you can specifiy it via the command line.
If the SMF already contains a mode, you cannot override it. If the
SMF contains no specific mode, and you do not specifiy one on the
command line, the playback is in whatever mode the MPU is already in.
There is no reset at the end of play; tmidi leaves the MPU in whatever
mode was last used.
For example:
[G:\]tmidi file.mid -gm
If file.mid has no embedded mode, GM mode will be used. If file.mid
does contain a mode, the mode in the file is always used.
Specifying Waits
----------------
To detect when the MPU interface has been reset out from under it, the
Paradise driver checks for a timeout condition to occur. By default, it
counts down 10,000 times before concluding that something's gone wrong.
For very fast systems this may be too soon. If you get a time-out error
reported, or otherwise do not hear anything when you expect you should,
use the -w1: switch to set this wait timeout value. The valid range is
1000 to 65535, with the default set to 10,000.
An additional fail-safe has been added to this time-out check: when a
time-out condition has occured 3 times in a row the current play is
stopped and tmidi exits. The next play should go as expected.
Specifying Tracks
-----------------
tmidi always plays the first track, track 1, regardless of what -t: is.
By default, tmidi plays all tracks in the SMF, up to 1000 or more tracks
(limited only by available memory). To selectively play any or all of the
first 32 tracks add the -t: switch, followed by the hex representation of
the tracks to mask. For example, to play only track 5, use:
-t:10 (this is a base-16 number: 10hex = 16decimal)
To use this feature in tmidi means that you need to learn a little bit
about base-16 numbers. Simply put, each digit in hex holds up to 16,
rather than 10 in decimal. Hex digits include 0,1,2...9,A,B,C,D,E,F
(the letters are used to represent 10 through 15). When you carry out
of a digit (in decimal it's like adding 1 to 9, getting 10), you do like
base-10 in that you store a 0 and carry a 1. In this case, though, the
10 hex is 16 (F hex=15 decimal, so F+1=10 hex, or 16 decimal). There
are bound to be several FAQs on hex and binary counting on the net.
You can play more than just one selective track: for example, to play
tracks 1, 2, and 10, use this simple addition method:
mask = 0
then, for each track:
mask = mask + (2 ^ (track-1)) where ^ is "to the power of"
So, for tracks 1,2,10:
tk# (mask = 0, to start with)
1 mask = 0 + 2 ^ (1-1) (mask = 1, since any number to the 0th is 1)
2 mask = 1 + 2 ^ (2-1) (mask = 1 + (2^1), or 1+2=3)
10 mask = 3 + 2 ^ (10-1) (mask = 3 + (2^9), or 3+512=515
Now, covert 515 to hex: 203. Use -t:203 to play tracks 1, 2, and 10. Do
not leave a space between the : and the first digit. Of course, if you
have a multi-base calculator, that helps, too. You could also do it in
binary, and convert that to hex (that's easier than base-10 to 0-16).
You may say why covert -- why not just use the base-10 version? Because
you always have to do the math; with hex you can easily do this in your
head. Why not offer both? Why not indeed. Why not metric and SAE? They
used to do that, then they dumped metric altogether. Good enough reason?
You can also experiment. A list of tracks that are played is shown whenever
-t: is used. For example:
[F:\mids\elp]tmidi ke91.mid -t:f
mpu:330 type:1 trks:29 div:480 mode:GS tmask:F
trks:12345678901234567890123456789
-086454041 IIII
Tracks 1,2,3,4 are played with -t:F, out of the 29 tracks in this SMF. Note
that tracks do not have any correlation to MIDI channels. For example, MIDI
-channel- 10 is the 'drum channel'. -Track- 10 can be Bass, Guitar, or yes,
even drums. The main idea in selective track playing is to isolate a single
track, or group of tracks, to better hear them.
Limitations
-----------
A compatible MPU-401 device is required. This includes not only
real MPU-401 devices, but cards like the Sound Blaster 16, AWE32, etc.,
with either a daughterboard (CL Wave Blaster, Yamaha DB50XG, etc.), or
a sound module or keyboard attached to the external MIDI port. Stand-
alone cards, like the Yamaha SW60XG, can be used, too. There are no
plans to work with other, non-MPU devices at this time.
Tips
----
If the SMF has no internal play mode specified (GM, GS, or XG), tmidi
plays it using whatever the MPU device was last set to. To prevent
playing a "generic" (a file with no internal play mode) in whatever
mode was last set, add -gm to each command line until you are sure
that the "generic" SMF is really a GS or XG. If there is an internal
play mode, adding -gm won't have any affect.
Since this is just a test bed for the Paradise MIDI driver you don't
have a slick UI. To play a whole lot of files without having to keep
feeding the command line, create a cmd file like this:
dir *.mid /b > all.cmd
Edit all.cmd by placing a ` in column 1 for all rows. Go back and
replace the ` with a tmidi<space> (or tmidi<space><quote>). If you
are using quotes around the name (spaces in the names), change .mid to
.mid<quote>. Then, just type in all.cmd. If you don't like a
tune, just hit a key (ctrl-C to exit for good). Stayed tuned for the
first part of the Paradise System, probably available in a month or so.
If -t: is used, only the first 32 tracks can be played (-t:FFFFFFFF).
Tracks 33 and later will be skipped in this case, along with any tracks
you have masked out.
See the README for more.
Filename is tmidi_17.zip. At ftp://hobbes.nmsu.edu/os2/... or the
sites listed below for the always-current version.